package com.itheima.consumer.feign;

import com.itheima.consumer.domain.Goods;
import org.springframework.stereotype.Component;

/**
 * feign的客户端降级处理类
 * 1.定义类实现GoodsFeignClient接口
 * 2.使用@Component将该类加入到spring的IOC容器中
 */
@Component
public class GoodsFeignClientFallBack implements GoodsFeignClient{
    @Override
    public Goods findGoodsById(int id) {
        Goods goods = new Goods();
        goods.setTitle("又降级了啊...");
        return goods;
    }
}
